The present invention relates in general to the field of computers and similar technologies, and in particular to software utilized in this field. Still more particularly, the present invention relates to JNDI validation.
The Java Naming Directory Interface (JNDI) is a major Application Program Interface (API) for Java 2 Enterprise Edition (J2EE) development. J2EE developers use the JNDI quite often inside a number of applications. JNDI is a major life line to linking components with other components as well as linking applications with external resources that exist outside the application. JNDI is a very simple API. A developer sets up a naming context and calls a lookup( ) method. The lookup( ) method takes a literal string. This literal string makes up the name of the artifact you are looking for. FIG. 1 depicts code 100 that shows a typical interaction with JNDI.
Having literal string names as shown in FIG. 1 allows applications not to have to know about names until the application is running. However, J2EE developers writing code have very little help when it comes to coding with JNDI. Developers often have to wait till testing to find out if there is an error inside their JNDI lookup code. Although JNDI code is commonly interspersed inside an application, developers often get the short end of the stick when it comes to JNDI validation due to problems associated with their inability to validate JNDI naming in code during initial code development.